<extend name="Common:main" />
<block name="cssjs">
<script src="__PUBLIC__/js/admin/store.js?{$Think.config.HTML_V}"></script>
<script src="__PUBLIC__/js/admin/mystore.js?{$Think.config.HTML_V}"></script>
</block>
<block name="content">
<php>$orderClass=array($orderKey=>'_'.$sortBy);$orderSort=array($orderKey=>($sortBy=='asc'?'升序':'倒序'));</php>
<div class="nav-tabs-custom">
	<ul class="nav nav-tabs">
    	<li><a href="{:U('Mystore/Collect')}">采集规则</a></li>
    	<li class="active"><a href="{:U('Mystore/ReleaseApp')}">发布应用</a></li>
    	<li class="nav-check-update"><a href="javascript:;" onclick="check_releaseapp_update()">检测更新</a></li>
	</ul>
	<div class="tab-content">
		<div class="tab-pane active">
		    <div class="table-responsive">
				<form id="form_list" method="post" ajax-submit="true" action="{:U('Mystore/releaseAppOp')}">
				<table id="list_table" class="table table-bordered table-hover datatable">
					<thead>
						<tr>
							<th class="chk">{$Think.lang.select}</th>
							<th class="sorting{$orderClass['name']}" data-order="name" title="名称{$orderSort['name']}">名称</th>
							<th class="sorting{$orderClass['app']}" data-order="app" title="app{$orderSort['app']}">APP</th>
							<th>模块</th>
							<th class="sorting{$orderClass['addtime']}" data-order="addtime" title="添加时间{$orderSort['addtime']}">添加时间</th>
							<th class="sorting{$orderClass['uptime']}" data-order="uptime" title="更新时间{$orderSort['uptime']}">更新时间</th>
							<th>详细</th>
							<th>{$Think.lang.op}</th>
						</tr>
					</thead>
					<tbody>
					<foreach name="appList" item="app">
						<tr data-app-id="{$app['id']}">
							<td class="chk"><input type="checkbox" name="ids[]" value="{$app['id']}" /></td>
							<td><a href="http://www.skycaiji.com/release/cms/detail?app={$app['app']}" class="store-detail">{$app['name']}</a></td>
							<td>{$app['app']}</td>
							<td>{$app['module']}</td>
							<td>{:date('Y-m-d H:i',$app['addtime'])}</td>
							<td>{:date('Y-m-d H:i',$app['uptime'])}</td>
							<td class="store-info"><a href="http://www.skycaiji.com/release/cms/detail?app={$app['app']}" class="store-detail">详细</a></td>
							<td><a href="{:U('Develop/releaseCms?app='.$app['app'])}">开发</a> &nbsp; <a href="javascript:;" url="{:U('Mystore/releaseAppOp?op=delete&id='.$app['id'])}" class="delete">删除</a></td>
						</tr>
					</foreach>
					</tbody>
					<tfoot>
						<tr>
							<td class="chk"><label><input type="checkbox" id="chkall" onclick="checkall(this,'ids[]')" />全部</label></td>
							<td colspan="7">
								<button type="button" class="btn btn btn-danger" id="deleteall">{$Think.lang.delete}</button>
								&nbsp;<a href="{:U('Develop/releaseCms')}" class="btn btn btn-success">开发一个</a>
							</td>
						</tr>
		    			<if condition="!empty($pagenav)">
						<tr>
							<td colspan="5">{$pagenav}</td>
						</tr>
						</if>
					</tfoot>
				</table>
				</form>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
init_releaseapp();
</script>
</block>